<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>欢迎使用 - 实时聊天应用</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            color: #333;
        }

        .welcome-container {
            max-width: 800px;
            margin: 0 auto;
            padding: 40px 20px;
        }

        .welcome-header {
            text-align: center;
            color: white;
            margin-bottom: 40px;
        }

        .welcome-header h1 {
            font-size: 48px;
            margin-bottom: 10px;
            font-weight: 700;
        }

        .welcome-header p {
            font-size: 20px;
            opacity: 0.9;
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 30px;
            margin-bottom: 40px;
        }

        .feature-card {
            background: white;
            padding: 30px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            text-align: center;
            transition: transform 0.3s;
        }

        .feature-card:hover {
            transform: translateY(-5px);
        }

        .feature-icon {
            font-size: 48px;
            color: #667eea;
            margin-bottom: 15px;
        }

        .feature-title {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 10px;
        }

        .feature-description {
            color: #666;
            line-height: 1.6;
        }

        .cta-section {
            text-align: center;
            background: white;
            padding: 40px;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        }

        .cta-title {
            font-size: 28px;
            margin-bottom: 15px;
            color: #333;
        }

        .cta-description {
            font-size: 16px;
            color: #666;
            margin-bottom: 30px;
        }

        .cta-buttons {
            display: flex;
            gap: 20px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .cta-button {
            padding: 15px 30px;
            border: none;
            border-radius: 25px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            text-decoration: none;
            transition: transform 0.3s;
        }

        .cta-button.primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .cta-button.secondary {
            background: white;
            color: #667eea;
            border: 2px solid #667eea;
        }

        .cta-button:hover {
            transform: translateY(-2px);
        }

        .footer {
            text-align: center;
            color: white;
            margin-top: 40px;
            opacity: 0.8;
        }

        @media (max-width: 600px) {
            .welcome-header h1 {
                font-size: 36px;
            }
            
            .features-grid {
                grid-template-columns: 1fr;
            }
            
            .cta-buttons {
                flex-direction: column;
                align-items: center;
            }
        }
    </style>
</head>
<body>
    <div class="welcome-container">
        <div class="welcome-header">
            <h1>🚀 实时聊天应用</h1>
            <p>连接世界，随时随地畅聊</p>
        </div>

        <div class="features-grid">
            <div class="feature-card">
                <div class="feature-icon">
                    <i class="fas fa-comments"></i>
                </div>
                <div class="feature-title">实时消息</div>
                <div class="feature-description">基于WebSocket的即时消息传输，毫秒级响应，让沟通零延迟</div>
            </div>

            <div class="feature-card">
                <div class="feature-icon">
                    <i class="fas fa-image"></i>
                </div>
                <div class="feature-title">多媒体支持</div>
                <div class="feature-description">支持图片、文件、语音消息，丰富的表达方式让聊天更有趣</div>
            </div>

            <div class="feature-card">
                <div class="feature-icon">
                    <i class="fas fa-mobile-alt"></i>
                </div>
                <div class="feature-title">跨平台</div>
                <div class="feature-description">响应式设计，完美适配手机、平板、电脑，随时随地保持连接</div>
            </div>

            <div class="feature-card">
                <div class="feature-icon">
                    <i class="fas fa-shield-alt"></i>
                </div>
                <div class="feature-title">安全可靠</div>
                <div class="feature-description">端到端加密，保护您的隐私安全，让聊天更安心</div>
            </div>
        </div>

        <div class="cta-section">
            <div class="cta-title">开始您的聊天之旅</div>
            <div class="cta-description">加入数千用户，体验最流畅的实时通讯</div>
            <div class="cta-buttons">
                <a href="register.html" class="cta-button primary">免费注册</a>
                <a href="index.html" class="cta-button secondary">直接登录</a>
            </div>
        </div>

        <div class="footer">
            <p>© 2024 实时聊天应用 | 让沟通更简单</p>
        </div>
    </div>

    <script>
        // 如果已登录，自动跳转到聊天页面
        const token = localStorage.getItem('token');
        if (token) {
            window.location.href = '/index.html';
        }
    </script>
</body>
</html>